//package com.xu.sso.web.config;
//
//import com.xu.sso.client.filter.LoginFilter;
//import com.xu.sso.client.filter.PowerFilter;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.web.servlet.FilterRegistrationBean;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class SSOFilterConfig {
//
//    @Autowired
//    private LoginFilter loginFilter;
//    @Autowired
//    private PowerFilter powerFilter;
//
//    @Bean
//    public FilterRegistrationBean loginFilterRegistration() {
//        FilterRegistrationBean registration = new FilterRegistrationBean();
//        registration.setFilter(loginFilter);
//        registration.addUrlPatterns("/*");
//        registration.setName("loginFilter");
//        registration.setOrder(1);
//        return registration;
//    }
//
//    @Bean
//    public FilterRegistrationBean powerFilterRegistration() {
//        FilterRegistrationBean registration = new FilterRegistrationBean();
//        registration.setFilter(powerFilter);
//        registration.addUrlPatterns("/*");
//        registration.setName("powerFilter");
//        registration.setOrder(2);
//        return registration;
//    }
//
//}
